package com.siashan.unipay4j.ali.conf;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AliConfigUtil {

    /**
     * 将应用列表转换成Map格式
     *
     * @param appList 应用列表
     * @return 应用map
     */
    public static Map<String, AliApp> transAppMap(List<AliApp> appList) {
        Map<String, AliApp> tmplMap = new HashMap<>();
        if (null != appList && !appList.isEmpty()) {
            for (AliApp app : appList) {
                tmplMap.put(app.getAppCode(), app);
            }
        }
        return tmplMap;
    }
}
